﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace KasaTakip
{
    public partial class frmMain : DevExpress.XtraEditors.XtraForm
    {
        public frmMain()
        {
            InitializeComponent();
        }

        private void mağazaRaporuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFiltre fl = new frmFiltre();
            if (fl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                frmReport rp = new frmReport();
                rp.RaporTipi = ReportTypes.MagazaRaporu;
                rp.Filtre = fl.Sonuc;
                rp.Show();
            }
        }

        private void kasaÖzetRaporuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFiltre fl = new frmFiltre();
            if (fl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                frmReport rp = new frmReport();
                rp.RaporTipi = ReportTypes.MagazaKasaOzet;
                rp.Filtre = fl.Sonuc;
                rp.Show();
            }
        }

        private void magazaÖzetRaporuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFiltre fl = new frmFiltre();
            if (fl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                frmReport rp = new frmReport();
                rp.RaporTipi = ReportTypes.MagazaOzet;
                rp.Filtre = fl.Sonuc;
                rp.Show();
            }
        }

        private void cariHesapRaporuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFiltre fl = new frmFiltre();
            fl.TarihGoster = true;
            if (fl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                frmReport rp = new frmReport();
                rp.RaporTipi = ReportTypes.CariHesaplar;
                rp.Filtre = fl.Sonuc;
                rp.Show();
            }
        }

        private void bankaRaporuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFiltre fl = new frmFiltre();
            fl.TarihGoster = true;
            if (fl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                frmReport rp = new frmReport();
                rp.RaporTipi = ReportTypes.KrediKartiOzet;
                rp.Filtre = fl.Sonuc;
                rp.Show();
            }
        }

        private void bankaDetayRaporuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFiltre fl = new frmFiltre();
            fl.TarihGoster = true;
            if (fl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                frmReport rp = new frmReport();
                rp.RaporTipi = ReportTypes.KrediKartiDetay;
                rp.Filtre = fl.Sonuc;
                rp.Show();
            }
        }

        private void mağazaKontrolRaporuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFiltre fl = new frmFiltre();
            if (fl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                frmReport rp = new frmReport();
                rp.RaporTipi = ReportTypes.MagazaKontrol;
                rp.Filtre = fl.Sonuc;
                rp.Show();
            }
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
        }

        private void cariPersonelTanıtımToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmCariTanitim frm = new frmCariTanitim();
            frm.ShowDialog();
        }

        private void kasiyerAçıkVeFazlalarıRaporuToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmFiltre fl = new frmFiltre();
            fl.TarihGoster = true;
            if (fl.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                frmReport rp = new frmReport();
                rp.RaporTipi = ReportTypes.KasiyerAciklari;
                rp.Filtre = fl.Sonuc;
                rp.Show();
            }
        }

        private void txtPass_TextChanged(object sender, EventArgs e)
        {
            if (txtPass.Text == "özpaş" + DateTime.Now.Day)
            {
                raporlarToolStripMenuItem.Enabled = true;
                txtPass.Visible = false;
                label1.Visible = false;
            }
        }
    }
}